We load the GeoJSON dataset for NUTS level-2 regions provided by Eurostat:
nutsrg2 <- read_sf('excercises/data/nutsrg_2.json')
st_crs(nutsrg2) <- 3857 # set the correct CRS
head(nutsrg2)
## Simple feature collection with 6 features and 2 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: 1347007 ymin: 4105701 xmax: 3847132 ymax: 6631069
## epsg (SRID): 3857
## proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
## # A tibble: 6 x 3
## id na geometry
## <chr> <chr> <MULTIPOLYGON [m]>
## 1 CY00 Κύπρος (((3592720 4172836, 3594320 4178301, 3607520 4169324, …
## 2 CZ01 Praha (((1588619 6463231, 1592220 6468696, 1617821 6476893, …
## 3 CZ02 Střední Če… (((1686224 6537392, 1685024 6526853, 1686624 6506167, …
## 4 CZ03 Jihozápad (((1492615 6461670, 1536217 6432006, 1539017 6395706, …
## 5 CZ04 Severozápad (((1612621 6534270, 1600220 6515144, 1520216 6485089, …
## 6 CZ05 Severových… (((1729426 6582279, 1758628 6576034, 1786629 6556127, …